import { http } from "@/utils/http";
type Result = {
  current_page: number;
  result?: any;
  per_page?: number;
  total?: number;
};
type ResultDelete = {
  code: number;
  msg: string;
};
type ResultCreate = {
  code: number;
  msg: string;
};
/** 大货信息 */
export const getBulkOrderListApi = (params?: object) => {
  return http.request<Result>("get", "/dashboard/bulkOrder/list", {
    params
  });
};
/** 添加*/
export const createBulkOrderApi = (data?: object) => {
  return http.request<ResultCreate>("post", "/dashboard/bulkOrder/store", {
    data
  });
};
/** 修改 */
export const updateBulkOrderApi = (data?: object) => {
  return http.request<ResultCreate>("put", "/dashboard/bulkOrder/update", {
    data
  });
};
export const delBulkOrderApi = (params?: object) => {
  return http.request<ResultDelete>("delete", "/dashboard/bulkOrder/delete", {
    params
  });
};
type Show = {
  code: number;
  msg: string;
  result?: any;
};
/** 详情 */
export const getBulkOrderShowApi = (params?: object) => {
  return http.request<Show>("get", "/dashboard/bulkOrder/show", {
    params
  });
};

/** 审核 */
export const updateStatusApi = (data?: object) => {
  return http.request<ResultCreate>("put", "/admin/corp/updateStatus", {
    data
  });
};

/** 扫描记录 */
export const getScanLogListApi = (params?: object) => {
  return http.request<Result>("get", "/dashboard/scanLog/list", {
    params
  });
};
/** 添加*/
export const createScanLogApi = (data?: object) => {
  return http.request<ResultCreate>("post", "/dashboard/scanLog/store", {
    data
  });
};
/** 修改 */
export const updateScanLogApi = (data?: object) => {
  return http.request<ResultCreate>("put", "/dashboard/scanLog/update", {
    data
  });
};
/** 删除 */
export const delScanLogApi = (params?: object) => {
  return http.request<ResultDelete>("delete", "/dashboard/scanLog/delete", {
    params
  });
};
/** 详情 */
export const getScanLogShowApi = (params?: object) => {
  return http.request<Show>("get", "/dashboard/scanLog/show", {
    params
  });
};
